package tasks;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Frame;

import java.awt.Rectangle;

import java.awt.event.KeyEvent;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;

public class AgentSelectDialog extends JDialog {
    private BorderLayout borderLayout1 = new BorderLayout();
    private JScrollPane agentsScrollPane = new JScrollPane();
    private JList agentsList = new JList();
    private JButton okButton = new JButton();

    public AgentSelectDialog() {
        this(null, "", false);
    }

    public AgentSelectDialog(Frame parent, String title, boolean modal) {
        super(parent, title, modal);
        try {
            jbInit();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        this.setSize(new Dimension(130, 199));
        this.getContentPane().setLayout(borderLayout1);
        agentsScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        agentsScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        okButton.setText("OK");
        okButton.setMnemonic(KeyEvent.VK_K);
        agentsScrollPane.getViewport().add(agentsList, null);
        this.getContentPane().add(agentsScrollPane, BorderLayout.NORTH);
        this.getContentPane().add(okButton, BorderLayout.SOUTH);
    }
}
